<%-- 
    Document   : Action
    Created on : Dec 5, 2012, 2:07:26 PM
    Author     : Admin
--%>

<%@page import="javabean.StoryBean"%>
<%@page import="java.util.ArrayList"%>
<%@page import="bo.StoryBO"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.text.DateFormat"%>
<%@page import="javassist.bytecode.analysis.Util"%>
<%@page import="java.util.Date"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%
    StoryBO storyBO = new StoryBO();
    ArrayList<StoryBean> storyList = storyBO.LayDanhSachTruyenTheoTL("Romance");
%>
<!DOCTYPE html>
<html>
    <script type="text/javascript">
        <!--
        window.onerror=function(m,u,l)
        {
            window.status = "Java Script Error: "+m;
            return true;
        }
        //-->
    </script>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Romance</title>
        <link href="/DeAn_WebTruyen/CSS/Site1.css" type="text/css" rel="stylesheet"/>
        <script type="text/javascript" src="/DeAn_WebTruyen/Menu/stmenu.js"></script>
        <script type="text/javascript" src="/DeAn_WebTruyen/JavaScript/RandomIMG.js"></script>
    </head>
    <body background="/DeAn_WebTruyen/Images/happy_christmas_holidays-1280x1024.jpg" class="main">
        <div class="container">
            <div class="header">
                <div class="header_top_left">
                    <%
                        Date d = new Date();
                        DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");

                        out.print(dateFormat.format(d));
                    %>
                </div>               
                <%--<div class="clear"></div>--%>
                <div class="header_main" > 

                    <script type="text/javascript">
        
                        var img1="12855184861024648803.jpg"
                        var img2="12855185051828767054.jpg"
                        var img3="1285518514197142706.jpg"
                        var img4="1285518527375730281.jpg"
                        var img5="1285518537601341394.jpg"

                        var cur=Math.round(5*Math.random())
                        if (cur<=1)
                        {
                            img=img1
                        }
                        else if (cur<=2)
                        {
                            img=img2
                        }
                        else if (cur<=3)
                        {
                            img=img3
                        }
                        else if (cur<=4)
                        {
                            img=img4
                        }        
                        else
                            img=img5
                        document.write('<div class="header_main" > <img src="../../Images/'+img+'"/></div>')
                       </script>
              
                </div>


            </div>

            <script type="text/javascript">
                <!--
                stm_bm(["menu4448",980,"","/DeAn_WebTruyen/Menu/blank.gif",0,"","",0,0,500,0,1000,1,0,0,"","100%",0,0,1,2,"default","hand","",1,25],this);
                stm_bp("p0",[0,4,0,0,0,0,0,0,100,"",-2,"",-2,50,0,0,"#999999","transparent","/DeAn_WebTruyen/Menu/line1.gif",3,0,0,"#000000"]);
                stm_ai("p0i0",[0,"Home","","",-1,-1,0,"/DeAn_WebTruyen/Home.jsp","_self","","","","",0,0,0,"","",0,0,0,1,1,"#E6EFF9",1,"#E6EFF9",1,"/DeAn_WebTruyen/Menu/line.gif","/DeAn_WebTruyen/Menu/line2.gif",3,3,0,0,"#E6EFF9","#000000","#045257","#7e4076","bold 12pt Verdana","bold 16pt Verdana",0,0,"/DeAn_WebTruyen/Menu/left1.gif","/DeAn_WebTruyen/Menu/left2.gif","/DeAn_WebTruyen/Menu/right1.gif","/DeAn_WebTruyen/Menu/right2.gif",14,19,37],200,0);
                stm_aix("p0i1","p0i0",[0,"Story List","","",-1,-1,0,"#"],200,0);
                stm_bp("p1",[1,4,0,0,5,0,5,0,100,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=0.30)",5,"",-2,80,0,0,"#CCCCCC","#b569ac","",3,0,0,"#CCCCCC","/DeAn_WebTruyen/Menu/topline.gif",8,1,0,"transparent","/DeAn_WebTruyen/Menu/topline.gif",3,"",-1,-1,0,"#b569ac","",3,"",-1,-1,0,"#b569ac","",3,"",-1,-1,0,"transparent","",3,"/DeAn_WebTruyen/Menu/topleft.gif","/DeAn_WebTruyen/Menu/topright.gif","","",10,8,11,8,20,20,20,20]);
                stm_ai("p1i0",[0,"Comedy","","",-1,-1,0,"/DeAn_WebTruyen/jsp/story/Comedy.jsp","_self","","","","",5,1,0,"","",0,0,0,1,1,"363636",1,"#9d5995",0,"","",3,3,0,0,"#E6EFF9","#000000","#e5e5e5","#FFFFFF","10pt Verdana","14pt Verdana",0,0,"","","","",0,0,0],200,20)
                stm_aix("p1i1","p1i0",[0,"Action","","",-1,-1,0,"/DeAn_WebTruyen/jsp/story/Action.jsp","_self","","","","",5,1,0,"","",0,0,0,1,1,"#2b2b2b"],200,20);
                stm_aix("p1i2","p1i1",[0,"Comic","","",-1,-1,0,"/DeAn_WebTruyen/jsp/story/comic.jsp","_self","","","","",5,1,0,"","",0,0,0,1,1,"#2b2b2b"],200,20);
                stm_aix("p1i4","p1i0",[0,"Magic","","",-1,-1,0,"/DeAn_WebTruyen/jsp/story/Magic.jsp","_self","","","","",5,1,0,"","",0,0,0,1,1,"#2b2b2b"],200,20);
                stm_aix("p1i5","p1i1",[0,"Romance","","",-1,-1,0,"/DeAn_WebTruyen/jsp/story/romance.jsp","_self","","","","",5,1,0,"","",0,0,0,1,1,"#2b2b2b"],200,20);
                
                
                stm_ep();
                stm_aix("p0i2","p0i1",[0,"Upload","","",-1,-1,0,"/DeAn_WebTruyen/jsp/story/pre_upload.jsp","_self","",""],200,0);
                stm_aix("p0i4","p0i0",[0,"About","","",-1,-1,0,"/DeAn_WebTruyen/jsp/About.jsp","_self","","Liên hệ"],200,0);
                stm_ep();
                stm_cf([0,0,0,"Main_frame","Navigation_frame",1]);
                stm_em();
                //-->
            </script>
            <div style="text-align: center"><h1>ROMANCE</h1></div>

            <div class="container" style="margin-top: 19px">
                <form name="ListOfStoryForm" action="/DeAn_WebTruyen/ListStoryServlet" method="POST" >
                     <table style="font-size: 17pt;border-color: white;border-style: double" >

                        <% for (int i = 0; i < storyList.size(); i++) {
                                StoryBean currentStory = storyList.get(i);
                        %>                       
                  
                        <div style="margin-top: 19px;width: 100%;">
                            <fieldset>
                                <div>
                                    <%
                                    String link1 = currentStory.getImage();
                                    out.print("<img src = \"/DeAn_WebTruyen/Images/" + link1 + "\"class=\"left\"/>");
                                %>
                                <br/><br/><b>Tiêu Đề : </b><input type="submit" name="storyName" value="<%=currentStory.getTitle()%>"/>
                                <br/><br/><b>Giới thiệu truyện: </b><%=currentStory.getGtt()%>
                                
                                </div>
                            </fieldset>
                        </div>      
                        <%
                        }%>
                        
                </table>
            </form>
            </div>
            <div class="clear"></div>


            <div style=" background-image:url(/DeAn_WebTruyen/Images/footer_bg2.jpg) ; color: #FF0000;">
                <p >
                    © Copyright . All right reserved
                    <br />
                    Email: <a href="mailto:maiphuong0403@Gmail.com"><img src="/DeAn_WebTruyen/Images/gmail-icon.gif">MaiPhuong0403@Gmail.com</a>
                <ul style="text-align: center">
                    Power by<img src="/DeAn_WebTruyen/Images/Untitled.png" />
                </ul>
                </p>

            </div>





    </body>
</html>

